package com.skywolf.chem.riding.mapper;

import com.skywolf.chem.riding.entity.Info;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.skywolf.chem.riding.pojo.RidingQueryDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 骑行表 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2020-09-07
 */
@Mapper
public interface InfoMapper extends BaseMapper<Info> {

    int updateRiding(@Param("uid")Long uid, @Param("num") Double num, @Param("updateTime")Date updateTime,@Param("updateType")Integer updateType);

    int getPaiMing(@Param("num") Double num);

    List<RidingQueryDto> getPageList(@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("startNum") Long startNum, @Param("endNum") Long endNum, @Param("queryType")Integer queryType,@Param("city")String city);

    Integer getPageCount(@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("city")String city);

    /**
     * 初始化上周跑步数据
     * @param startTime
     * @return
     */
    int updateRindIngInitWeek(@Param("startTime")String startTime);

    int updateRindIngInitDay(@Param("startTime")String startTime);

    Long getMaxId();

    List<LocalDateTime> getLocalDateTime();

    void addRiding(Info info);
}
